<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 300px;
            height: 300px;
            background: red;
        }

        /* 鼠标移上去旋转360 */
        div:hover {
            /* 旋转 */
            transform: rotate(360deg);
            /* 过渡效果 */
            transition: all .5s;
        }
    </style>
</head>

<body>
    <div></div>
</body>

</html>